import graph_tool as gt
import graph_tool.draw as gt_draw
import graph_tool.spectral as gts
import numpy as np
from old_gt import gt_graph_io
from old_gt import gt_graph_sim_indices as sim
from itertools import izip
import timeit

def main():
#     file_path = "/Users/rockyrock/Desktop/Netwoks/data/facebook/107.edges"
    file_path = "/Users/rockyrock/Desktop/edges.txt"
    
    g = gt_graph_io.read_graph(file_path)
    start = timeit.default_timer()
    s = sim.lhn1(g.g)
    stop = timeit.default_timer()
    print "Time:", stop - start 
    print s[g.label_to_index['1'], g.label_to_index['52']]
#     print g.label_to_index['1'], g.label_to_index['52']
#     v1 = g.get_vertix('1')
#     v2 = g.get_vertix('52')
#     print int(v1), int(v2)
#     print g.get_v_label(v2)
#     print g.v_labels()
#     print g.v_indices()
#     print g.v_items()
#     print len(g.v_labels())
#     print g.A.shape
#     print type(g.A)
#     print g.edges_ids
#     print g.target
    
#     for edge_id, target in izip(g.edges_ids, g.target):
#         print edge_id, target

    
    
main()